\(\int x^{-1+\frac {n}{2}} \cosh (a+b x^n) \, dx\) [53]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 18, antiderivative size = 71 \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=\frac {e^{-a} \sqrt {\pi } \text {erf}\left (\sqrt {b} x^{n/2}\right )}{2 \sqrt {b} n}+\frac {e^a \sqrt {\pi } \text {erfi}\left (\sqrt {b} x^{n/2}\right )}{2 \sqrt {b} n} \]

[Out]

1/2*erf(x^(1/2*n)*b^(1/2))*Pi^(1/2)/exp(a)/n/b^(1/2)+1/2*exp(a)*erfi(x^(1/2*n)*b^(1/2))*Pi^(1/2)/n/b^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {5465, 5407, 2235, 2236} \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=\frac {\sqrt {\pi } e^{-a} \text {erf}\left (\sqrt {b} x^{n/2}\right )}{2 \sqrt {b} n}+\frac {\sqrt {\pi } e^a \text {erfi}\left (\sqrt {b} x^{n/2}\right )}{2 \sqrt {b} n} \]

[In]

Int[x^(-1 + n/2)*Cosh[a + b*x^n],x]

[Out]

(Sqrt[Pi]*Erf[Sqrt[b]*x^(n/2)])/(2*Sqrt[b]*E^a*n) + (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x^(n/2)])/(2*Sqrt[b]*n)

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2236

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F],
 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 5407

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] + Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rule 5465

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/(m + 1), Subst[Int[(a
+ b*Cosh[c + d*x^Simplify[n/(m + 1)]])^p, x], x, x^(m + 1)], x] /; FreeQ[{a, b, c, d, m, n}, x] && IntegerQ[p]
 && NeQ[m, -1] && IGtQ[Simplify[n/(m + 1)], 0] &&  !IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \cosh \left (a+b x^2\right ) \, dx,x,x^{n/2}\right )}{n} \\ & = \frac {\text {Subst}\left (\int e^{-a-b x^2} \, dx,x,x^{n/2}\right )}{n}+\frac {\text {Subst}\left (\int e^{a+b x^2} \, dx,x,x^{n/2}\right )}{n} \\ & = \frac {e^{-a} \sqrt {\pi } \text {erf}\left (\sqrt {b} x^{n/2}\right )}{2 \sqrt {b} n}+\frac {e^a \sqrt {\pi } \text {erfi}\left (\sqrt {b} x^{n/2}\right )}{2 \sqrt {b} n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.80 \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=\frac {e^{-a} \sqrt {\pi } \left (\text {erf}\left (\sqrt {b} x^{n/2}\right )+e^{2 a} \text {erfi}\left (\sqrt {b} x^{n/2}\right )\right )}{2 \sqrt {b} n} \]

[In]

Integrate[x^(-1 + n/2)*Cosh[a + b*x^n],x]

[Out]

(Sqrt[Pi]*(Erf[Sqrt[b]*x^(n/2)] + E^(2*a)*Erfi[Sqrt[b]*x^(n/2)]))/(2*Sqrt[b]*E^a*n)

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.76

method result size
risch \(\frac {{\mathrm e}^{-a} \sqrt {\pi }\, \operatorname {erf}\left (x^{\frac {n}{2}} \sqrt {b}\right )}{2 n \sqrt {b}}+\frac {{\mathrm e}^{a} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-b}\, x^{\frac {n}{2}}\right )}{2 n \sqrt {-b}}\) \(54\)
meijerg \(\frac {\sqrt {2}\, \sqrt {\pi }\, \left (\frac {\sqrt {i b}\, \sqrt {2}\, \operatorname {erf}\left (x^{\frac {n}{2}} \sqrt {b}\right )}{2 \sqrt {b}}+\frac {\sqrt {i b}\, \sqrt {2}\, \operatorname {erfi}\left (x^{\frac {n}{2}} \sqrt {b}\right )}{2 \sqrt {b}}\right ) \cosh \left (a \right )}{2 \sqrt {i b}\, n}-\frac {i \sqrt {2}\, \sqrt {\pi }\, \left (-\frac {\sqrt {2}\, \left (i b \right )^{\frac {3}{2}} \operatorname {erf}\left (x^{\frac {n}{2}} \sqrt {b}\right )}{2 b^{\frac {3}{2}}}+\frac {\sqrt {2}\, \left (i b \right )^{\frac {3}{2}} \operatorname {erfi}\left (x^{\frac {n}{2}} \sqrt {b}\right )}{2 b^{\frac {3}{2}}}\right ) \sinh \left (a \right )}{2 \sqrt {i b}\, n}\) \(139\)

[In]

int(x^(-1+1/2*n)*cosh(a+b*x^n),x,method=_RETURNVERBOSE)

[Out]

1/2/n*exp(-a)*Pi^(1/2)/b^(1/2)*erf(x^(1/2*n)*b^(1/2))+1/2/n*exp(a)*Pi^(1/2)/(-b)^(1/2)*erf((-b)^(1/2)*x^(1/2*n
))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.38 \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=-\frac {\sqrt {\pi } \sqrt {-b} {\left (\cosh \left (a\right ) + \sinh \left (a\right )\right )} \operatorname {erf}\left (\sqrt {-b} x \cosh \left (\frac {1}{2} \, {\left (n - 2\right )} \log \left (x\right )\right ) + \sqrt {-b} x \sinh \left (\frac {1}{2} \, {\left (n - 2\right )} \log \left (x\right )\right )\right ) - \sqrt {\pi } \sqrt {b} {\left (\cosh \left (a\right ) - \sinh \left (a\right )\right )} \operatorname {erf}\left (\sqrt {b} x \cosh \left (\frac {1}{2} \, {\left (n - 2\right )} \log \left (x\right )\right ) + \sqrt {b} x \sinh \left (\frac {1}{2} \, {\left (n - 2\right )} \log \left (x\right )\right )\right )}{2 \, b n} \]

[In]

integrate(x^(-1+1/2*n)*cosh(a+b*x^n),x, algorithm="fricas")

[Out]

-1/2*(sqrt(pi)*sqrt(-b)*(cosh(a) + sinh(a))*erf(sqrt(-b)*x*cosh(1/2*(n - 2)*log(x)) + sqrt(-b)*x*sinh(1/2*(n -
 2)*log(x))) - sqrt(pi)*sqrt(b)*(cosh(a) - sinh(a))*erf(sqrt(b)*x*cosh(1/2*(n - 2)*log(x)) + sqrt(b)*x*sinh(1/
2*(n - 2)*log(x))))/(b*n)

Sympy [F]

\[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=\int x^{\frac {n}{2} - 1} \cosh {\left (a + b x^{n} \right )}\, dx \]

[In]

integrate(x**(-1+1/2*n)*cosh(a+b*x**n),x)

[Out]

Integral(x**(n/2 - 1)*cosh(a + b*x**n), x)

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.97 \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=\frac {\sqrt {\pi } x^{\frac {1}{2} \, n} {\left (\operatorname {erf}\left (\sqrt {b x^{n}}\right ) - 1\right )} e^{\left (-a\right )}}{2 \, \sqrt {b x^{n}} n} + \frac {\sqrt {\pi } x^{\frac {1}{2} \, n} {\left (\operatorname {erf}\left (\sqrt {-b x^{n}}\right ) - 1\right )} e^{a}}{2 \, \sqrt {-b x^{n}} n} \]

[In]

integrate(x^(-1+1/2*n)*cosh(a+b*x^n),x, algorithm="maxima")

[Out]

1/2*sqrt(pi)*x^(1/2*n)*(erf(sqrt(b*x^n)) - 1)*e^(-a)/(sqrt(b*x^n)*n) + 1/2*sqrt(pi)*x^(1/2*n)*(erf(sqrt(-b*x^n
)) - 1)*e^a/(sqrt(-b*x^n)*n)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.73 \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=-\frac {\frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {b} \sqrt {x^{n}}\right ) e^{\left (-a\right )}}{\sqrt {b}} + \frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {-b} \sqrt {x^{n}}\right ) e^{a}}{\sqrt {-b}}}{2 \, n} \]

[In]

integrate(x^(-1+1/2*n)*cosh(a+b*x^n),x, algorithm="giac")

[Out]

-1/2*(sqrt(pi)*erf(-sqrt(b)*sqrt(x^n))*e^(-a)/sqrt(b) + sqrt(pi)*erf(-sqrt(-b)*sqrt(x^n))*e^a/sqrt(-b))/n

Mupad [F(-1)]

Timed out. \[ \int x^{-1+\frac {n}{2}} \cosh \left (a+b x^n\right ) \, dx=\int x^{\frac {n}{2}-1}\,\mathrm {cosh}\left (a+b\,x^n\right ) \,d x \]

[In]

int(x^(n/2 - 1)*cosh(a + b*x^n),x)

[Out]

int(x^(n/2 - 1)*cosh(a + b*x^n), x)